<?php /* @var $this Controller */ 
$USER = Yii::app()->user;
$isGuest = $USER->getIsGuest();
?>
<!DOCTYPE html>
<html>
<head>
	<title><?php echo CHtml::encode($this->_title); ?></title>
	<meta name="keywords" content="<?php echo CHtml::encode($this->_keywords); ?>" />
	<meta name="description" content="<?php echo CHtml::encode($this->_description); ?>" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/style.css" rel="stylesheet" type="text/css" media="screen"/>
	<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/reveal.css" rel="stylesheet" type="text/css" media="screen"/>
	<!--[if IE]>
	<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" rel="stylesheet" type="text/css" media="screen"/>
	<![endif]-->
	<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/not-ie.css" rel="stylesheet" type="text/css" media="screen"/>
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery-1.7.min.js"  type="text/javascript"></script>
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.selectbox.min.js"  type="text/javascript"></script>
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jcarousellite_1.0.1.js"  type="text/javascript"></script>
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.reveal.js"  type="text/javascript"></script>
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jcarousel-conn.js"  type="text/javascript"></script>
	<?php /*<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.pikachoose.min.js"  type="text/javascript"></script>*/?>
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.jcarousel.min.js"  type="text/javascript"></script>
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.touchwipe.min.js"  type="text/javascript"></script>
	<link href="<?php echo Yii::app()->request->baseUrl; ?>/favicon.jpg" rel="shortcut icon" type="image/x-icon" />
	
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/fancy/jquery.fancybox.js?v=2.1.5"></script>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/js/fancy/jquery.fancybox.css?v=2.1.5" media="screen" />
	
	</head>
<body>
<div id="site">
	<div class="topmenu">
		<div class="wfix">
			<div class="menu">
			<?php $this->widget('zii.widgets.CMenu',array(
				'items'=>array(
					array('label'=>'Как искать недвижимость', 'url'=>array('/kak_iskat')),
					array('label'=>'Как сдать недвижимость', 'url'=>array('/kak_sdat')),
					array('label'=>'Правила', 'url'=>array('/rules')),

					/*array('label'=>'Home', 'url'=>array('/site/index')),
					array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
					array('label'=>'Contact', 'url'=>array('/site/contact')),
					array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
					array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)*/
				),
			)); ?>
			</div>
			<?php if ($isGuest) { ?>
			<div class="auth">
				<a href="#" data-reveal-id="login">Войти</a><?php /*&nbsp;|&nbsp;<a href="/registration/">Регистрация</a>*/?>
			</div>
			<?php } else { ?>
			<div class="auth">
				<a href="/cabinet/">Личный кабинет</a>&nbsp;|&nbsp;<a href="/site/logout/">Выйти</a>
			</div>
			<?php } ?>
			<div class="clr"></div>
		</div>
	</div>
	<div class="cnt wfix">
		<div class="lgfm">
			<div class="logo">
				<?php if ($_SERVER['REQUEST_URI'] == '/') { ?>
				<span class="l1"><?php echo CHtml::encode(Yii::app()->name); ?></span>
				<br/>
				<span class="l2">Без посредников</span>
				<?php } else { ?>
				<a href="/"><span class="l1"><?php echo CHtml::encode(Yii::app()->name); ?></span>
				<br/>
				<span class="l2">Без посредников</span></a>
				<?php } ?>
			</div>
			<div class="city">
				Выбрать город <span><a <?php //data-reveal-id="city-list"?> href="/catalog/nsk/">Новосибирск</a></span><br/>
				<?php //В Новосибирске <b>125 600</b> предложений ?>
			</div>
			<div class="clr"></div>
		</div>
		<?php if(isset($this->breadcrumbs)):?>
			<?php $this->widget('zii.widgets.CBreadcrumbs', array(
				'links'=>$this->breadcrumbs,
				'homeLink'=>CHtml::link('Главная', Yii::app()->homeUrl),
			)); ?>
		<?php endif?>
		<?php if ($this->getRoute() == 'site/page') echo '<h1>'.$this->_h1.'</h1>'; ?>
		<?php 
		// Контентная часть
		
		echo $content; 
		?>
		<?php 
		$this->renderPartial('/site/inner_link');
		?>
	</div>
	<div class="wfix footer">
		<div class="copyright">@ givemehome.ru <?php 
		$text = 'Аренда недвижимости без посредников';
		if ($_SERVER['REQUEST_URI'] != '/') 
			echo CHtml::link($text, '/'); 
		else 
			echo $text;?></div>
		<div class="menu">
		<?php $this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'Новости', 'url'=>array('/news')),
				array('label'=>'Статьи', 'url'=>array('/article')),
				array('label'=>'Документы', 'url'=>array('/documents')),
				array('label'=>'Контакты', 'url'=>array('/contacts')),
				array('label'=>'Обратная связь', 'url'=>array('/feedback')),
			),
		)); ?>
		</div>
		<div class="clr"></div>
	</div>
</div>

<?php //print_r(Yii::app()->user); echo Yii::app()->user->checkAccess('admin') ? 'true' : 'false'; ?>
<div id="login" class="reveal-modal">
<?php $loginModel = new LoginForm;
$this->renderPartial('/site/_login_form', array('model'=>$loginModel));?>
</div>

<div id="addr" class="reveal-modal">


<div class="title">�����</div>
<table>

<tr>
<td>
<label>���</label><br/>
<input type="text"/>	
</td>
</tr>


<tr>
<td>
<label>�����</label>
<br/>
<textarea></textarea>
</td>
</tr>

<tr>
<td>
<br/>
<input type="submit" value="���������"/>
</td>
</tr>

</table>
<a class="close-reveal-modal">Close</a>
</div>
<?php /*
<div id="city-list" class="city_list">
<?php $this->renderPartial('/site/_cities_form', array());?>
</div>
*/?>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/functions.js"  type="text/javascript"></script>
<script type="text/javascript">
(function (d, w, c) {
    (w[c] = w[c] || []).push(function() {
        try {
            w.yaCounter24708500 = new Ya.Metrika({id:24708500,
                    clickmap:true,
                    trackLinks:true,
                    accurateTrackBounce:true});
        } catch(e) { }
    });

    var n = d.getElementsByTagName("script")[0],
        s = d.createElement("script"),
        f = function () { n.parentNode.insertBefore(s, n); };
    s.type = "text/javascript";
    s.async = true;
    s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";

    if (w.opera == "[object Opera]") {
        d.addEventListener("DOMContentLoaded", f, false);
    } else { f(); }
})(document, window, "yandex_metrika_callbacks");
</script>
<noscript><div><img src="//mc.yandex.ru/watch/24708500" style="position:absolute; left:-9999px;" alt="" /></div></noscript>

<script type="text/javascript"><!--
new Image().src = "//counter.yadro.ru/hit?r"+
escape(document.referrer)+((typeof(screen)=="undefined")?"":
";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?
screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
";"+Math.random();//--></script>
<script type="text/javascript">(window.Image ? (new Image()) : document.createElement('img')).src = location.protocol + '//vk.com/rtrg?r=sc*4Ah8PuedHYRZ0btNH8ZeejLZMVG/efiprALxtz/10NuC4ytzO9*V4Gm/daBen/0bjdCRFpTa3oEKUTiko9cqQz5MJCGwwgzth*s6f3RVawFPJ5/GOi5cSXkEjNtMftvhiOcPyOFZ/alStgxg4lJM287sc2n2pAgbSMT2Wos0-';</script>
</body>
</html>






<?php /* @var $this Controller 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />

	<!-- blueprint CSS framework -->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
	<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->

	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>

<div class="container" id="page">

	<div id="header">
		<div id="logo"><?php echo CHtml::encode(Yii::app()->name); ?></div>
	</div><!-- header -->

	<div id="mainmenu">
		<?php $this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'Home', 'url'=>array('/site/index')),
				array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
				array('label'=>'Contact', 'url'=>array('/site/contact')),
				array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
				array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
			),
		)); ?>
	</div><!-- mainmenu -->
	<?php if(isset($this->breadcrumbs)):?>
		<?php $this->widget('zii.widgets.CBreadcrumbs', array(
			'links'=>$this->breadcrumbs,
		)); ?><!-- breadcrumbs -->
	<?php endif?>

	<?php echo $content; ?>

	<div class="clear"></div>

	<div id="footer">
		Copyright &copy; <?php echo date('Y'); ?> by My Company.<br/>
		All Rights Reserved.<br/>
		<?php echo Yii::powered(); ?>
	</div><!-- footer -->

</div><!-- page -->


</body>
</html>
*/ ?>